#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPushButton>
#include <QHBoxLayout>
#include <QTextEdit>
#include <QLabel>
#include "ParametersControl.h"
#include "Calculator.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    Ui::MainWindow *ui;
    QPushButton *bt_process_;
    QPushButton *bt_add_;
    QPushButton *bt_del_;
    QPushButton *reset_;
    QPushButton *next_;
    
    QLabel *result_process_;
    std::vector<QTextEdit *> operation_;
    std::vector<QHBoxLayout*> factorLayouts_;
    ParametersControl *parameter_;
    Calculator *calculator_;
    int index_result;
    QThread* thread_;

public slots:
    void addNewFactor();
    void deleteFactor();
    void runCalculation();
    void ResetAll();
//    void Next();
//    void finishTreatment();
//    void launchTreatment();
//    void validationField(/*QTextEdit *sender*/);

public:
    explicit MainWindow(QWidget *parent = 0);
    void createLayoutLeft();
    void createLayoutRight();
    QHBoxLayout* createHorizontalLayoutFactor(char *, bool);
    ~MainWindow();

signals:
    void finished();
};

#endif // MAINWINDOW_H
